package com.tg.data.http.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.tange.base.toolkit.DateUtil;

public class EventMessageBean implements Parcelable {
    private int id;
    private String uuid;
    private String start_time;
    private String end_time;
    private String tag;
    private String tag_name;
    private String audio_type;
    private int is_body;
    private String image_path;
    private int device_id;
    private String nickname;
    private String ossid;
    private String tag_icon;
    private String tag_msg;



    public void setTag_msg(String tag_msg) {
        this.tag_msg = tag_msg;
    }

    public String getTag_msg() {
        return tag_msg;
    }

    public void setTag_icon(String tag_icon) {
        this.tag_icon = tag_icon;
    }

    public String getTag_icon() {
        return tag_icon;
    }

    public void setTag_name(String tag_name) {
        this.tag_name = tag_name;
    }

    public String getTag_name() {
        return tag_name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setStart_time(String start_time) {
        this.start_time = start_time;
    }

    public String getEnd_time() {
        return end_time;
    }

    public void setEnd_time(String end_time) {
        this.end_time = end_time;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getImage_path() {
        return image_path;
    }

    public void setImage_path(String image_path) {
        this.image_path = image_path;
    }

    public int getDevice_id() {
        return device_id;
    }

    public void setDevice_id(int device_id) {
        this.device_id = device_id;
    }
    public String getOssid() {
        return ossid;
    }

    public EventMessageBean(){}

    protected EventMessageBean(Parcel in) {
        id = in.readInt();
        uuid = in.readString();
        start_time = in.readString();
        end_time = in.readString();
        tag = in.readString();
        audio_type = in.readString();
        image_path = in.readString();
        device_id = in.readInt();
        nickname = in.readString();
        ossid = in.readString();
        tag_name = in.readString();
        tag_icon = in.readString();
        tag_msg = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(uuid);
        dest.writeString(start_time);
        dest.writeString(end_time);
        dest.writeString(tag);
        dest.writeString(audio_type);
        dest.writeString(image_path);
        dest.writeInt(device_id);
        dest.writeString(nickname);
        dest.writeString(ossid);
        dest.writeString(tag_name);
        dest.writeString(tag_icon);
        dest.writeString(tag_msg);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<EventMessageBean> CREATOR = new Creator<EventMessageBean>() {
        @Override
        public EventMessageBean createFromParcel(Parcel in) {
            return new EventMessageBean(in);
        }

        @Override
        public EventMessageBean[] newArray(int size) {
            return new EventMessageBean[size];
        }
    };

    public  int getStartTimeSec(){
        return DateUtil.getSecondDay(this.start_time);
    }
    public  int getEndTimeSec(){
        return DateUtil.getSecondDay(this.end_time);
    }

    @Override
    public String toString() {
        return "EventMessageBean{" +
                "id=" + id +
                ", uuid='" + uuid + '\'' +
                ", start_time='" + start_time + '\'' +
                ", end_time='" + end_time + '\'' +
                ", tag='" + tag + '\'' +
                ", audio_type='" + audio_type + '\'' +
                ", image_path='" + image_path + '\'' +
                ", device_id=" + device_id +
                ", nickname='" + nickname + '\'' +
                ", tag_name='" + tag_name + '\'' +
                ", tag_icon='" + tag_icon + '\'' +
                ", tag_msg='" + tag_msg + '\'' +
                '}';
    }


}
